<div class="tmpl_div"  style="display: none;">

    <!--首页文章分类模板-->
    <div id='article_category_ul_tmpl'>
        <li class="article_category_li_${id}"><a href="/?cid=${id}"><i class='icon-chevron-right'></i>${name}</a></li> 
    </div>
    
    <!--首页文章列表模板-->
    <div id='article_ul_tmpl'>
        <div class="">
            <h3><a href="?act=details&id=${id}">${name}</a></h3>
        </div>
        <div>
            <p class="lead">${describe}</p>
        </div>
        <div>
            <span><a href="?act=details&id=${id}">查看全文</a></span>
            <span class="pull-right">
            <span>发布时间：${create_time}</span>
            </span>
        </div>
        <hr/>
    </div>

</div>

<script type="text/javascript">

    function getPageHtml(data)
    {
        
        $.post("{:url('common/page')}", {current_page:data.current_page,last_page:data.last_page}, success, "text");
        return false;
        
        function success(data)
        {
            $('#page_div').html(data);
        }
    }

    $(function(){
        
        $('.fakeloader').show();
        
        $.template("article_category_ul_tmpl", $('#article_category_ul_tmpl'));
        $.template("article_ul_tmpl", $('#article_ul_tmpl') );
        
        var page = getUrlParam('page');
        
        if (null == page) { page = 1;}
        
        var cid = "{$cid}";
        
        $.post(api_domain + '/api.php/combination/index.html', {access_token:access_token,list_rows:5, page:page, category_id:cid}, success, "json");
        return false;
        
        function success(data)
        {
            
            $.tmpl("article_category_ul_tmpl", data.data.article_category_list).appendTo("#article_category_ul");
            $.tmpl("article_ul_tmpl", data.data.article_list.data).appendTo("#article_ul");
            
            getPageHtml(data.data.article_list);
            
            $('.article_category_li_' + "{$cid}").addClass('active');
            
            setTimeout(function(){ $('.fakeloader').hide(); }, 500);
        }
        
    });
</script>